home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / ghostscript / src / ps2ascii < prev    next >
Text File  |  1994-08-01  |  560b  |  14 lines

  1. #!/bin/sh -f
  2. # Extract ASCII text from a PostScript file.  Usage:
  3. #    ps2ascii [infile.ps [outfile.txt]]
  4. # If outfile is omitted, output goes to stdout.
  5. # If both infile and outfile are omitted, ps2ascii acts as a filter,
  6. # reading from stdin and writing on stdout.
  7. if ( test $# -eq 0 ) then
  8.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps - quit.ps
  9. elif ( test $# -eq 1 ) then
  10.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps $1 quit.ps
  11. else
  12.     gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps $1 quit.ps >$2
  13. fi
  14.